<!doctype html>
<html lang="en">

<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="shortcut icon" href="/static/img/logo/favicon.ico" />
  <link rel="stylesheet" href="/static/assets/plugins/bootstrap/css/bootstrap.min.css">
  <link rel="stylesheet" href="/static/css/footer.css">
  <link rel="stylesheet" href="/static/css/header.css">
  <title>论坛</title>

</head>

<body>
  {% include 'header.html' %}
  <main class="container  mt-3">
    <div class="row">
      <div class="col-9">
        <div class="row">
          <div class="col-8">
            <p>
              <img class="" style="width: 24px; height: 24px;" src="/static/img/logo/toutiao.png" alt="" data-v-e8da5228="">
              <span class="fw-bolder">头条</span> 
            </p>
            <div class="row">
              <div class="col-7">
                <img class="w-100 mb-3" src="https://img-home.csdnimg.cn/images/20220408055843.jpg" alt="">
                <a href="https://blog.csdn.net/csdnopensource/article/details/124023504?spm=1000.2115.3001.5926" class="text-dark fw-bolder  text-decoration-none">从Apache Member到Apache董事，他花了11年</a>
                <p class=" fw-lighter text-truncate" style="font-size: 14px; color: #999;">“开源是为数不多能让大家合作的净土，需要我们细心呵护”</p>
              </div>
              <div class="col-5">
                <div>
                  <p class="fw-bolder text-truncate mb-1">
                    <a href="https://blog.csdn.net/csdnopensource/article/details/124023504?spm=1000.2115.3001.5926" class="text-dark text-decoration-none ">从Apache Member到Apache董事，他花了11年</a>
                  </p>
                  <p class=" fw-lighter text-truncate" style="font-size: 14px; color: #999;">“国内首个开源架构治理平台ArchGu”</p>
                </div>
                <div>
                  <p class="fw-bolder text-truncate mb-1">
                    <a href="https://blog.csdn.net/csdnopensource/article/details/124023504?spm=1000.2115.3001.5926" class=" text-dark text-decoration-none ">
                      仅20%开发者懂操作系统
                    </a>
                  </p>
                  <p class=" fw-lighter text-truncate" style="font-size: 14px; color: #999;">“仅20%开发者懂操作系统”</p>
                </div>
                <div>
                  <p class="fw-bolder text-truncate mb-1">
                    <a href="https://blog.csdn.net/csdnopensource/article/details/124023504?spm=1000.2115.3001.5926" class="text-dark text-decoration-none ">
                      那些被Java复杂性吓退的开发者们
                    </a>
                  </p>
                  <p class=" fw-lighter text-truncate" style="font-size: 14px; color: #999;">“那些被Java复杂性吓退的开发者们”</p>
                </div>
                <div>
                  <p class="fw-bolder text-truncate mb-1">
                    <a href="https://blog.csdn.net/csdnopensource/article/details/124023504?spm=1000.2115.3001.5926" class="text-dark text-decoration-none ">
                      为什么我还摆脱不了复制粘贴？
                    </a>
                  </p>
                  <p class=" fw-lighter text-truncate" style="font-size: 14px; color: #999;">“为什么我还摆脱不了复制粘贴？”</p>
                </div>
                <div>
                  <p class="fw-bolder text-truncate mb-1">
                    <a href="https://blog.csdn.net/csdnopensource/article/details/124023504?spm=1000.2115.3001.5926" class="text-dark text-decoration-none ">
                      深度学习正深陷困境
                    </a>
                  </p>
                  <p class=" fw-lighter text-truncate" style="font-size: 14px; color: #999;">“深度学习正深陷困境”</p>
                </div>
              </div>
            </div>
          </div>
          <div class="col-4">
            <p>
              <img class="" style="width: 24px; height: 24px;" src="/static/img/logo/redian.png" alt="" data-v-0045335f="">
              <span class="fw-bolder">热点</span> 
            </p>
              <div>
                <p class="fw-bolder text-truncate mb-1">
                  <a href="https://blog.csdn.net/csdnopensource/article/details/124023504?spm=1000.2115.3001.5926" class="text-dark text-decoration-none ">从Apache Member到Apache董事，他花了11年</a>
                </p>
                <p class=" fw-lighter text-truncate" style="font-size: 14px; color: #999;">“国内首个开源架构治理平台ArchGu”</p>
              </div>
              <div>
                <p class="fw-bolder text-truncate mb-1">
                  <a href="https://blog.csdn.net/csdnopensource/article/details/124023504?spm=1000.2115.3001.5926" class="text-dark text-decoration-none ">
                    那些被Java复杂性吓退的开发者们
                  </a>
                </p>
                <p class=" fw-lighter text-truncate" style="font-size: 14px; color: #999;">“那些被Java复杂性吓退的开发者们”</p>
              </div>
              <div>
                <p class="fw-bolder text-truncate mb-1">
                  <a href="https://blog.csdn.net/csdnopensource/article/details/124023504?spm=1000.2115.3001.5926" class="text-dark text-decoration-none ">
                    为什么我还摆脱不了复制粘贴？
                  </a>
                </p>
                <p class=" fw-lighter text-truncate" style="font-size: 14px; color: #999;">“为什么我还摆脱不了复制粘贴？”</p>
              </div>
              <div>
                <p class="fw-bolder text-truncate mb-1">
                  <a href="https://blog.csdn.net/csdnopensource/article/details/124023504?spm=1000.2115.3001.5926" class="text-dark text-decoration-none ">
                    深度学习正深陷困境
                  </a>
                </p>
                <p class=" fw-lighter text-truncate" style="font-size: 14px; color: #999;">“深度学习正深陷困境”</p>
              </div>
              <div>
                <p class="fw-bolder text-truncate mb-1">
                  <a href="https://blog.csdn.net/csdnopensource/article/details/124023504?spm=1000.2115.3001.5926" class="text-dark text-decoration-none ">
                    那些被Java复杂性吓退的开发者们
                  </a>
                </p>
                <p class=" fw-lighter text-truncate" style="font-size: 14px; color: #999;">“那些被Java复杂性吓退的开发者们”</p>
              </div>

          </div>
        </div>
        <div>
          <div class="nav-scroller py-1 mb-2 border-bottom pb-0">
            <nav class="nav d-flex justify-content-between">
              <p class="p-1 fs-5  text-secondary">最新博客</p>
              <a class="p-1 link-secondary " href="/all-0-0-0">查看全部</a>
    
            </nav>
          </div>
          <div class="row mb-2">
            {% for t in r_list %}
            <div class="bolog">
              <div class="row g-0 border-bottom  overflow-hidden flex-md-row mb-2  h-md-250 position-relative">
                <div class="col p-2 pb-2 d-flex flex-column position-static ">
                  <!-- <strong class="d-inline-block mb-2 text-success">{{ t.t_kind }}</strong> -->
                  <p class="mb-0 fw-bolder"><a href="/single/{{ t.t_id }}" class=" text-dark text-decoration-none ">{{ t.t_title }} </a></p>

                  <p class="mb-auto" style="font-size: 14px; color: #999;">{{ t.t_introduce }}</p>
                  <p class="mb-0">
                    {% if t.t_like_type == 'no' %}
                    <img iddd="{{ t.t_id }}" alt="+1" style="width: 20px;" class="like"
                      src="/static/img/logo/hand-thumbs-up.svg">
                    <span class="reactions-count text-muted ">{{t.t_like}}</span>
                    <img iddd="{{ t.t_id }}" alt="-1" style="width: 20px;" class="dislike ms-3"
                      src="/static/img/logo/hand-thumbs-down.svg">
                    <span class="reactions-count text-muted ">{{t.t_dislike}}</span>
                    {% elif t.t_like_type %}
                    <img iddd="{{ t.t_id }}" alt="+1" style="width: 20px;" class="like"
                      src="/static/img/logo/hand-thumbs-up-fill.svg">
                    <span class="reactions-count text-muted ">{{t.t_like}}</span>
                    <img iddd="{{t.t_id}}" alt="-1" style="width: 20px;" class="dislike ms-3"
                      src="/static/img/logo/hand-thumbs-down.svg">
                    <span class="reactions-count text-muted ">{{t.t_dislike}}</span>
                    {% else %}
                    <img iddd="{{ t.t_id }}" alt="+1" style="width: 20px;" class="like"
                      src="/static/img/logo/hand-thumbs-up.svg">
                    <span class="reactions-count text-muted ">{{t.t_like}}</span>
                    <img iddd="{{ t.t_id }}" alt="-1" style="width: 20px;" class="dislike ms-3"
                      src="/static/img/logo/hand-thumbs-down-fill.svg">
                    <span class="reactions-count text-muted ">{{t.t_dislike}}</span>
                    {% endif %}
                    <span class="ms-3 text-muted">{{ t.t_uid }}</span>
                  </p>
                </div>
              </div>
            </div>
            {% endfor %}
          </div>
        </div>

      </div>
  
      <div class="col-3">
        <div class="">
         
          <div id="carouselExampleIndicators" class="carousel slide" data-bs-ride="carousel">
            <div class="carousel-indicators">
              <button type="button" data-bs-target="#carouselExampleIndicators" data-bs-slide-to="0" class="active" aria-current="true" aria-label="Slide 1"></button>
              <button type="button" data-bs-target="#carouselExampleIndicators" data-bs-slide-to="1" aria-label="Slide 2"></button>
            </div>
            <div class="carousel-inner">
              <div class="carousel-item active">
                <img class="d-block w-100 w-100 img-thumbnail rounded" src="/static/img/logo/guanggao1.png" alt="">
              </div>
              <div class="carousel-item">
                <img class="d-block w-100 w-100 img-thumbnail rounded" src="/static/img/logo/guanggao2.jpg" alt="">
              </div>
            </div>
          </div>
        </div>
        <div class="w-100 border rounded p-0 mt-3">
          <p class=" fw-bolder border-bottom p-2 ">公告</p>
          {% for a in a_list %}
            <p class="pe-3 ps-3"> <a href="/single-an-{{ a.a_id }}" class="text-dark text-decoration-underline ">{{ a.a_title }}</a></p>
          {% endfor %}
        </div>
        <div class="w-100 border rounded  p-0 mt-3">
          <p class=" fw-bolder border-bottom p-2 ">友情连接</p>
          <div class="row p-3 pt-1 ps-3">
              <a href="https://www.scujj.edu.cn/" target="_blank"  class="m-3 p-1 w-auto border text-center text-dark text-decoration-none">学校官网</a>
              <a href="https://www.scujj.edu.cn/" target="_blank"  class="m-3 p-1 w-auto border text-center text-dark text-decoration-none">教务系统</a>
              <a href="https://www.chsi.com.cn/" target="_blank"  class="m-3 p-1 w-auto border text-center text-dark text-decoration-none">学信网</a>



          </div>
        </div>
      </div>
    </div>


  </main>


  {% include 'footer.html' %}


  <script src="/static/assets/plugins/bootstrap/js/bootstrap.bundle.min.js"></script>

  <script>
    $(document).ready(function () {
      $('.like').click(function () {

        var tid = $(this).attr("iddd");
        $.ajax({
          url: '/like/',
          type: "POST",
          data: {
            'like': 'like',
            'tid': tid
          },
          beforeSend: function (xhr,
            settings) {
            xhr.setRequestHeader(
              "X-CSRFToken",
              "{{ csrf_token }}"
            ); // csrf
          },
          success: function (data) {
            if (data
              .result) {
              var n = $(
                  this)
                .next()
                .html();
              $(this).next()
                .html(Number(
                    n) +
                  1
                );
              $(this).attr("src",
                "/static/img/logo/hand-thumbs-up-fill.svg"
              );
            } else {
              alert(data
                .msg)
            }
          }.bind(this)
        });
      });
      $('.dislike').click(function () {

        var tid = $(this).attr("iddd");
        $.ajax({
          url: '/like/',
          type: "POST",
          data: {
            'like': 'dislike',
            'tid': tid
          },
          beforeSend: function (xhr,
            settings) {
            xhr.setRequestHeader(
              "X-CSRFToken",
              "{{ csrf_token }}"
            ); // csrf
          },
          success: function (data) {
            if (data
              .result) {
              var n = $(
                  this)
                .next()
                .html();
              $(this).next()
                .html(Number(
                    n) +
                  1
                );
              $(this).attr("src",
                "/static/img/logo/hand-thumbs-down-fill.svg"
              );
            } else {
              alert(data
                .msg)
            }
          }.bind(this)
        });
      });


    });
  </script>
</body>

</html>